<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业完成情况</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
    <h1>作业完成情况</h1>
    <table>
        <tr>
            <th>学生序号</th>
            <th>学生名</th>
            <th>作业是否提交</th>
            <th>作业是否批改</th>
        </tr>
        {% for student in students %}
            <tr>
                <td>{{ loop.index }}</td>
                <td>{{ student.studentName }}</td>
                <td>
                    {% if student.file_path is none %}
                        作业还未提交
                    {% else %}
                         <a href="{{ url_for('assignments.download_file', filepath=student.file_path) }}" download>下载文件</a>
                    {% endif %}
                </td>
                <td>
                    {% if student.grade is none %}
                         <a href="{{ url_for('assignments.grade_page', id=student.id, assignmentId=assignmentId, classId = class_id) }}">设置分数</a>
                    {% else %}
                        作业已批改
                    {% endif %}
                </td>

            </tr>
        {% endfor %}
    </table>
</body>
</html>